public class Solution1332 {
    public int removePalindromeSub(String s) {
        for (int i=0,j=s.length()-1;i<j;i++,j--){
            if (s.charAt(i)!=s.charAt(j)){
                return 2;
            }
        }
        return 1;
    }

    public static void main(String[] args) {
        System.out.println(new Solution1332().removePalindromeSub("abb"));
    }
}
